<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>P205 9.1.2 如何使用正则</title>
</head>

<body>
    <script>
        var str1 = 'Abc123abc456';
        var reg = /abc/i;
        reg.exec(str1);
        var str = "It's is the shorthand of it is";
        var reg1 = /it/gi;
        str.match(reg1);
        var reg2 = /^it/gi;
        str.match(reg2);
        var reg3 = /s/gi;
        str.match(reg3);
        var reg4 = /s$/gi;
        str.match(reg4);
    </script>
    <a href="../首页/page09.html">
        <h2>返回上一页面</h2>
    </a>
</body>

</html>